package be.kuleuven.cs.mop.domain.model.impl;



/**
 * Represents an element of the {@link World}
 */
public abstract class WorldElement {
	
	private final World world;
	
	
	protected WorldElement(final World world) {
		if (world == null)
			throw new NullPointerException("World == NULL");
		this.world = world;
	}
	
	
	
	/**
	 * Returns the {@linkplain Clock}
	 */
	protected Clock getTime() {
		return getWorld().getClock();
	}
	
	/**
	 * Returns the {@linkplain World}
	 */
	protected World getWorld() { return world; }
	
}